<?php

require_once("registereduserobj.php");
if (isset($_SESSION["REGISTEREDUSER"])) {unset($_SESSION["REGISTEREDUSER"]);}
$obj = new registereduser();
$obj->passwordreminder();
if ($obj->valid) {
 confirm();
} else {
 showpage($obj);
}
exit;

function confirm() {
 echo "Reminder sent. Check your email.";
}

function showpage($obj) {

 $i = $obj->header;
 
 echo "<h1>Password reset</h1>";
 echo "<form name='form' method=post>";
 echo "<table>";
 
 echo "<tr>";
 echo "<td>Email</td>";
 echo "<td>";
 echo "<input name=f9 value='$i[9]'>";
 echo "</td>";
 echo "<td>";
 echo $obj->valids[9];
 echo "</td>";
 echo "</tr>";
 echo "</table>";
 echo "<input type=submit>";
 echo "</form>"; 
 }
?>